let exchangeMap=localStorage.getItem("exchangeMap");
if(!exchangeMap){
  exchangeMap=require("../service/base/supportTokens").exchangeMap
  localStorage.setItem("exchangeMap",JSON.stringify(exchangeMap))
  console.log('exchangeMap')
}else{
  exchangeMap = JSON.parse(exchangeMap);
}

const state={
  exchangeMap:exchangeMap
}

const getters={
  exchangeMap:state=>state.exchangeMap
}

const actions={
  setExchangeMap:(context,exchangeMap)=>{
    context.commit('mSetExchangeMap',exchangeMap)
    localStorage.setItem("exchangeMap",JSON.stringify(exchangeMap))
  }
}

const mutations={
  mSetExchangeMap:(state,exchangeMap)=>{
    state.exchangeMap = exchangeMap;
  }
}

export default {
  state,getters,actions,mutations
}
